package com.ym.domain.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnType;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Table
@TableComment("客户汇总表")
public class CusCustomerSummary {

    @TableId
    @Column
    @ColumnComment("客户id")
    @IsKey
    private Integer customerId;

    @Column
    @ColumnComment("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Column
    @ColumnComment("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Column
    @ColumnComment("逻辑删除")
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Boolean isDeleted;

    @Column
    @ColumnComment("购买域名数量")
    private Integer buyDomainCount;

    @Column
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("交易总额")
    private BigDecimal totalTransactionAmount;

    @Column
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("利润总额")
    private BigDecimal totalProfitAmount;

    @Column
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("充值总额")
    private BigDecimal totalRechargeAmount;

    @Column
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("提现总额(线下)")
    private BigDecimal totalWithdrawAmount;

    @Column
    @ColumnComment("拥有域名数量")
    private Integer ownDomainCount;

}
